From 02e0af95336666b0792f02d19126fbbb2f7f20e4 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 2 Mar 2007 15:32:42 +0000 Subject: [PATCH] [PVFB][TOOLS] Terminate backend when frontend vanishes early Ensure the backend terminates when the frontend vanishes before the connection is established. This happens when the guest doesn't have the devices. Signed-off-by: Markus Armbruster --- tools/xenfb/xenfb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/xenfb/xenfb.c b/tools/xenfb/xenfb.c index a692f8fd86..eb46de1c92 100644 --- a/tools/xenfb/xenfb.c +++ b/tools/xenfb/xenfb.c @@ -245,11 +245,10 @@ static int xenfb_wait_for_state(struct xs_handle *xsh, const char *dir, unsigned state, dummy; char **vec; + awaited |= 1 << XenbusStateUnknown; + for (;;) { state = xenfb_read_state(xsh, dir); - if (state < 0) - return -1; - if ((1 << state) & awaited) return state; -- 2.30.2